package com.whfc.openapi.api.car.controller;

import com.whfc.common.result.Result;
import com.whfc.common.result.ResultUtil;
import com.whfc.openapi.api.car.service.OpenCarWashDataService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 车辆冲洗
 */
@RestController
@RequestMapping("/open/api/v1/carWash")
public class CarWashDataController {

    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private OpenCarWashDataService openCarWashDataService;
    /**
     * 车辆冲洗(通用接口)
     *
     * @return
     * @throws Exception
     */
    @RequestMapping("/anon/reviceData")
    public Result record(@RequestBody String body) throws Exception {
        logger.info("车辆冲洗记录同步：{}", body);
        openCarWashDataService.record(body);
        return ResultUtil.success();
    }


}
